<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>MediaSourceTestRunner (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="MediaSourceTestRunner (ExoPlayer library)";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.google.android.exoplayer2.testutil</a></div>
<h2 title="Class MediaSourceTestRunner" class="title">Class MediaSourceTestRunner</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>com.google.android.exoplayer2.testutil.MediaSourceTestRunner</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public class <span class="typeNameLabel">MediaSourceTestRunner</span>
extends <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></pre>
<div class="block">A runner for <a href="../source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSource</code></a> tests.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TIMEOUT_MS">TIMEOUT_MS</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(com.google.android.exoplayer2.source.MediaSource,com.google.android.exoplayer2.upstream.Allocator)">MediaSourceTestRunner</a></span>&#8203;(<a href="../source/MediaSource.html" title="interface in com.google.android.exoplayer2.source">MediaSource</a>&nbsp;mediaSource,
                     <a href="../upstream/Allocator.html" title="interface in com.google.android.exoplayer2.upstream">Allocator</a>&nbsp;allocator)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#assertCompletedManifestLoads(java.lang.Integer...)">assertCompletedManifestLoads</a></span>&#8203;(<a href="https://developer.android.com/reference/java/lang/Integer.html" title="class or interface in java.lang" class="externalLink" target="_top">Integer</a>...&nbsp;windowIndices)</code></th>
<td class="colLast">
<div class="block">Asserts that the media source reported completed loads via <a href="../source/MediaSourceEventListener.html#onLoadCompleted(int,com.google.android.exoplayer2.source.MediaSource.MediaPeriodId,com.google.android.exoplayer2.source.LoadEventInfo,com.google.android.exoplayer2.source.MediaLoadData)"><code>MediaSourceEventListener.onLoadCompleted(int, MediaPeriodId, LoadEventInfo, MediaLoadData)</code></a> for
 each specified window index and a null period id.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#assertCompletedMediaPeriodLoads(com.google.android.exoplayer2.source.MediaSource.MediaPeriodId...)">assertCompletedMediaPeriodLoads</a></span>&#8203;(<a href="../source/MediaSource.MediaPeriodId.html" title="class in com.google.android.exoplayer2.source">MediaSource.MediaPeriodId</a>...&nbsp;mediaPeriodIds)</code></th>
<td class="colLast">
<div class="block">Asserts that the media source reported completed loads via <a href="../source/MediaSourceEventListener.html#onLoadCompleted(int,com.google.android.exoplayer2.source.MediaSource.MediaPeriodId,com.google.android.exoplayer2.source.LoadEventInfo,com.google.android.exoplayer2.source.MediaLoadData)"><code>MediaSourceEventListener.onLoadCompleted(int, MediaPeriodId, LoadEventInfo, MediaLoadData)</code></a> for
 each specified media period id, and asserts that the associated window index matches the one in
 the last known timeline returned from <a href="#prepareSource()"><code>prepareSource()</code></a>, <a href="#assertTimelineChange()"><code>assertTimelineChange()</code></a>
 or <a href="#assertTimelineChangeBlocking()"><code>assertTimelineChangeBlocking()</code></a>.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#assertNoTimelineChange()">assertNoTimelineChange</a></span>()</code></th>
<td class="colLast">
<div class="block">Asserts that the source has not notified its listener of a timeline change since the last call
 to <a href="#assertTimelineChangeBlocking()"><code>assertTimelineChangeBlocking()</code></a> or <a href="#assertTimelineChange()"><code>assertTimelineChange()</code></a> (or since the
 runner was created if neither method has been called).</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#assertPrepareAndReleaseAllPeriods()">assertPrepareAndReleaseAllPeriods</a></span>()</code></th>
<td class="colLast">
<div class="block">Creates and releases all periods (including ad periods) defined in the last timeline to be
 returned from <a href="#prepareSource()"><code>prepareSource()</code></a>, <a href="#assertTimelineChange()"><code>assertTimelineChange()</code></a> or <a href="#assertTimelineChangeBlocking()"><code>assertTimelineChangeBlocking()</code></a>.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../Timeline.html" title="class in com.google.android.exoplayer2">Timeline</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#assertTimelineChange()">assertTimelineChange</a></span>()</code></th>
<td class="colLast">
<div class="block">Asserts that the source has notified its listener of a single timeline change.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="../Timeline.html" title="class in com.google.android.exoplayer2">Timeline</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#assertTimelineChangeBlocking()">assertTimelineChangeBlocking</a></span>()</code></th>
<td class="colLast">
<div class="block">Asserts that the source notifies its listener of a single timeline change.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createPeriod(com.google.android.exoplayer2.source.MediaSource.MediaPeriodId)">createPeriod</a></span>&#8203;(<a href="../source/MediaSource.MediaPeriodId.html" title="class in com.google.android.exoplayer2.source">MediaSource.MediaPeriodId</a>&nbsp;periodId)</code></th>
<td class="colLast">
<div class="block">Calls <a href="../source/MediaSource.html#createPeriod(com.google.android.exoplayer2.source.MediaSource.MediaPeriodId,com.google.android.exoplayer2.upstream.Allocator,long)"><code>MediaSource.createPeriod(MediaSource.MediaPeriodId, Allocator, long)</code></a> with a zero
 start position on the playback thread, asserting that a non-null <a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source"><code>MediaPeriod</code></a> is
 returned.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createPeriod(com.google.android.exoplayer2.source.MediaSource.MediaPeriodId,long)">createPeriod</a></span>&#8203;(<a href="../source/MediaSource.MediaPeriodId.html" title="class in com.google.android.exoplayer2.source">MediaSource.MediaPeriodId</a>&nbsp;periodId,
            long&nbsp;startPositionUs)</code></th>
<td class="colLast">
<div class="block">Calls <a href="../source/MediaSource.html#createPeriod(com.google.android.exoplayer2.source.MediaSource.MediaPeriodId,com.google.android.exoplayer2.upstream.Allocator,long)"><code>MediaSource.createPeriod(MediaSource.MediaPeriodId, Allocator, long)</code></a> on the
 playback thread, asserting that a non-null <a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source"><code>MediaPeriod</code></a> is returned.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/util/concurrent/CountDownLatch.html" title="class or interface in java.util.concurrent" class="externalLink" target="_top">CountDownLatch</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#preparePeriod(com.google.android.exoplayer2.source.MediaPeriod,long)">preparePeriod</a></span>&#8203;(<a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a>&nbsp;mediaPeriod,
             long&nbsp;positionUs)</code></th>
<td class="colLast">
<div class="block">Calls <a href="../source/MediaPeriod.html#prepare(com.google.android.exoplayer2.source.MediaPeriod.Callback,long)"><code>MediaPeriod.prepare(MediaPeriod.Callback, long)</code></a> on the playback thread and blocks
 until the method has been called.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="../Timeline.html" title="class in com.google.android.exoplayer2">Timeline</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#prepareSource()">prepareSource</a></span>()</code></th>
<td class="colLast">
<div class="block">Prepares the source on the playback thread, asserting that it provides an initial timeline.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#release()">release</a></span>()</code></th>
<td class="colLast">
<div class="block">Releases the runner.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#releasePeriod(com.google.android.exoplayer2.source.MediaPeriod)">releasePeriod</a></span>&#8203;(<a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a>&nbsp;mediaPeriod)</code></th>
<td class="colLast">
<div class="block">Calls <a href="../source/MediaSource.html#releasePeriod(com.google.android.exoplayer2.source.MediaPeriod)"><code>MediaSource.releasePeriod(MediaPeriod)</code></a> on the playback thread.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#releaseSource()">releaseSource</a></span>()</code></th>
<td class="colLast">
<div class="block">Calls <a href="../source/MediaSource.html#releaseSource(com.google.android.exoplayer2.source.MediaSource.MediaSourceCaller)"><code>MediaSource.releaseSource(MediaSourceCaller)</code></a> on the playback thread.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#runOnPlaybackThread(java.lang.Runnable)">runOnPlaybackThread</a></span>&#8203;(<a href="https://developer.android.com/reference/java/lang/Runnable.html" title="class or interface in java.lang" class="externalLink" target="_top">Runnable</a>&nbsp;runnable)</code></th>
<td class="colLast">
<div class="block">Runs the provided <a href="https://developer.android.com/reference/java/lang/Runnable.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>Runnable</code></a> on the playback thread, blocking until execution completes.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a id="TIMEOUT_MS">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>TIMEOUT_MS</h4>
<pre>public static final&nbsp;int TIMEOUT_MS</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.testutil.MediaSourceTestRunner.TIMEOUT_MS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(com.google.android.exoplayer2.source.MediaSource,com.google.android.exoplayer2.upstream.Allocator)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>MediaSourceTestRunner</h4>
<pre>public&nbsp;MediaSourceTestRunner&#8203;(<a href="../source/MediaSource.html" title="interface in com.google.android.exoplayer2.source">MediaSource</a>&nbsp;mediaSource,
                             <a href="../upstream/Allocator.html" title="interface in com.google.android.exoplayer2.upstream">Allocator</a>&nbsp;allocator)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaSource</code> - The source under test.</dd>
<dd><code>allocator</code> - The allocator to use during the test run.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a id="runOnPlaybackThread(java.lang.Runnable)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>runOnPlaybackThread</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;runOnPlaybackThread&#8203;(<a href="https://developer.android.com/reference/java/lang/Runnable.html" title="class or interface in java.lang" class="externalLink" target="_top">Runnable</a>&nbsp;runnable)</pre>
<div class="block">Runs the provided <a href="https://developer.android.com/reference/java/lang/Runnable.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>Runnable</code></a> on the playback thread, blocking until execution completes.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>runnable</code> - The <a href="https://developer.android.com/reference/java/lang/Runnable.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>Runnable</code></a> to run.</dd>
</dl>
</li>
</ul>
<a id="prepareSource()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>prepareSource</h4>
<pre class="methodSignature">public&nbsp;<a href="../Timeline.html" title="class in com.google.android.exoplayer2">Timeline</a>&nbsp;prepareSource()
                       throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
<div class="block">Prepares the source on the playback thread, asserting that it provides an initial timeline.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The initial <a href="../Timeline.html" title="class in com.google.android.exoplayer2"><code>Timeline</code></a>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code></dd>
</dl>
</li>
</ul>
<a id="createPeriod(com.google.android.exoplayer2.source.MediaSource.MediaPeriodId)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createPeriod</h4>
<pre class="methodSignature">public&nbsp;<a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a>&nbsp;createPeriod&#8203;(<a href="../source/MediaSource.MediaPeriodId.html" title="class in com.google.android.exoplayer2.source">MediaSource.MediaPeriodId</a>&nbsp;periodId)</pre>
<div class="block">Calls <a href="../source/MediaSource.html#createPeriod(com.google.android.exoplayer2.source.MediaSource.MediaPeriodId,com.google.android.exoplayer2.upstream.Allocator,long)"><code>MediaSource.createPeriod(MediaSource.MediaPeriodId, Allocator, long)</code></a> with a zero
 start position on the playback thread, asserting that a non-null <a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source"><code>MediaPeriod</code></a> is
 returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>periodId</code> - The id of the period to create.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The created <a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source"><code>MediaPeriod</code></a>.</dd>
</dl>
</li>
</ul>
<a id="createPeriod(com.google.android.exoplayer2.source.MediaSource.MediaPeriodId,long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createPeriod</h4>
<pre class="methodSignature">public&nbsp;<a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a>&nbsp;createPeriod&#8203;(<a href="../source/MediaSource.MediaPeriodId.html" title="class in com.google.android.exoplayer2.source">MediaSource.MediaPeriodId</a>&nbsp;periodId,
                                long&nbsp;startPositionUs)</pre>
<div class="block">Calls <a href="../source/MediaSource.html#createPeriod(com.google.android.exoplayer2.source.MediaSource.MediaPeriodId,com.google.android.exoplayer2.upstream.Allocator,long)"><code>MediaSource.createPeriod(MediaSource.MediaPeriodId, Allocator, long)</code></a> on the
 playback thread, asserting that a non-null <a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source"><code>MediaPeriod</code></a> is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>periodId</code> - The id of the period to create.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The created <a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source"><code>MediaPeriod</code></a>.</dd>
</dl>
</li>
</ul>
<a id="preparePeriod(com.google.android.exoplayer2.source.MediaPeriod,long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>preparePeriod</h4>
<pre class="methodSignature">public&nbsp;<a href="https://developer.android.com/reference/java/util/concurrent/CountDownLatch.html" title="class or interface in java.util.concurrent" class="externalLink">CountDownLatch</a>&nbsp;preparePeriod&#8203;(<a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source" target="_top">MediaPeriod</a>&nbsp;mediaPeriod,
                                    long&nbsp;positionUs)</pre>
<div class="block">Calls <a href="../source/MediaPeriod.html#prepare(com.google.android.exoplayer2.source.MediaPeriod.Callback,long)"><code>MediaPeriod.prepare(MediaPeriod.Callback, long)</code></a> on the playback thread and blocks
 until the method has been called.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaPeriod</code> - The <a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source"><code>MediaPeriod</code></a> to prepare.</dd>
<dd><code>positionUs</code> - The position at which to prepare.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A <a href="https://developer.android.com/reference/java/util/concurrent/CountDownLatch.html" title="class or interface in java.util.concurrent" class="externalLink" target="_top"><code>CountDownLatch</code></a> that will be counted down when preparation completes.</dd>
</dl>
</li>
</ul>
<a id="releasePeriod(com.google.android.exoplayer2.source.MediaPeriod)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>releasePeriod</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;releasePeriod&#8203;(<a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a>&nbsp;mediaPeriod)</pre>
<div class="block">Calls <a href="../source/MediaSource.html#releasePeriod(com.google.android.exoplayer2.source.MediaPeriod)"><code>MediaSource.releasePeriod(MediaPeriod)</code></a> on the playback thread.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaPeriod</code> - The <a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source"><code>MediaPeriod</code></a> to release.</dd>
</dl>
</li>
</ul>
<a id="releaseSource()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>releaseSource</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;releaseSource()</pre>
<div class="block">Calls <a href="../source/MediaSource.html#releaseSource(com.google.android.exoplayer2.source.MediaSource.MediaSourceCaller)"><code>MediaSource.releaseSource(MediaSourceCaller)</code></a> on the playback thread.</div>
</li>
</ul>
<a id="assertNoTimelineChange()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>assertNoTimelineChange</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;assertNoTimelineChange()</pre>
<div class="block">Asserts that the source has not notified its listener of a timeline change since the last call
 to <a href="#assertTimelineChangeBlocking()"><code>assertTimelineChangeBlocking()</code></a> or <a href="#assertTimelineChange()"><code>assertTimelineChange()</code></a> (or since the
 runner was created if neither method has been called).</div>
</li>
</ul>
<a id="assertTimelineChange()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>assertTimelineChange</h4>
<pre class="methodSignature">public&nbsp;<a href="../Timeline.html" title="class in com.google.android.exoplayer2">Timeline</a>&nbsp;assertTimelineChange()</pre>
<div class="block">Asserts that the source has notified its listener of a single timeline change.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The new <a href="../Timeline.html" title="class in com.google.android.exoplayer2"><code>Timeline</code></a>.</dd>
</dl>
</li>
</ul>
<a id="assertTimelineChangeBlocking()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>assertTimelineChangeBlocking</h4>
<pre class="methodSignature">public&nbsp;<a href="../Timeline.html" title="class in com.google.android.exoplayer2">Timeline</a>&nbsp;assertTimelineChangeBlocking()</pre>
<div class="block">Asserts that the source notifies its listener of a single timeline change. If the source has
 not yet notified its listener, it has up to the timeout passed to the constructor to do so.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The new <a href="../Timeline.html" title="class in com.google.android.exoplayer2"><code>Timeline</code></a>.</dd>
</dl>
</li>
</ul>
<a id="assertPrepareAndReleaseAllPeriods()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>assertPrepareAndReleaseAllPeriods</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;assertPrepareAndReleaseAllPeriods()
                                       throws <a href="https://developer.android.com/reference/java/lang/InterruptedException.html" title="class or interface in java.lang" class="externalLink" target="_top">InterruptedException</a></pre>
<div class="block">Creates and releases all periods (including ad periods) defined in the last timeline to be
 returned from <a href="#prepareSource()"><code>prepareSource()</code></a>, <a href="#assertTimelineChange()"><code>assertTimelineChange()</code></a> or <a href="#assertTimelineChangeBlocking()"><code>assertTimelineChangeBlocking()</code></a>. The <a href="../source/MediaPeriodId.html#windowSequenceNumber"><code>MediaPeriodId.windowSequenceNumber</code></a> is set to the
 index of the window.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/InterruptedException.html" title="class or interface in java.lang" class="externalLink" target="_top">InterruptedException</a></code></dd>
</dl>
</li>
</ul>
<a id="assertCompletedManifestLoads(java.lang.Integer...)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>assertCompletedManifestLoads</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;assertCompletedManifestLoads&#8203;(<a href="https://developer.android.com/reference/java/lang/Integer.html" title="class or interface in java.lang" class="externalLink" target="_top">Integer</a>...&nbsp;windowIndices)</pre>
<div class="block">Asserts that the media source reported completed loads via <a href="../source/MediaSourceEventListener.html#onLoadCompleted(int,com.google.android.exoplayer2.source.MediaSource.MediaPeriodId,com.google.android.exoplayer2.source.LoadEventInfo,com.google.android.exoplayer2.source.MediaLoadData)"><code>MediaSourceEventListener.onLoadCompleted(int, MediaPeriodId, LoadEventInfo, MediaLoadData)</code></a> for
 each specified window index and a null period id. Also asserts that no other loads with media
 period id null are reported.</div>
</li>
</ul>
<a id="assertCompletedMediaPeriodLoads(com.google.android.exoplayer2.source.MediaSource.MediaPeriodId...)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>assertCompletedMediaPeriodLoads</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;assertCompletedMediaPeriodLoads&#8203;(<a href="../source/MediaSource.MediaPeriodId.html" title="class in com.google.android.exoplayer2.source">MediaSource.MediaPeriodId</a>...&nbsp;mediaPeriodIds)</pre>
<div class="block">Asserts that the media source reported completed loads via <a href="../source/MediaSourceEventListener.html#onLoadCompleted(int,com.google.android.exoplayer2.source.MediaSource.MediaPeriodId,com.google.android.exoplayer2.source.LoadEventInfo,com.google.android.exoplayer2.source.MediaLoadData)"><code>MediaSourceEventListener.onLoadCompleted(int, MediaPeriodId, LoadEventInfo, MediaLoadData)</code></a> for
 each specified media period id, and asserts that the associated window index matches the one in
 the last known timeline returned from <a href="#prepareSource()"><code>prepareSource()</code></a>, <a href="#assertTimelineChange()"><code>assertTimelineChange()</code></a>
 or <a href="#assertTimelineChangeBlocking()"><code>assertTimelineChangeBlocking()</code></a>.</div>
</li>
</ul>
<a id="release()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>release</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;release()</pre>
<div class="block">Releases the runner. Should be called when the runner is no longer required.</div>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
